﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

public partial class Employees_EditEmployees : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            mvEmployees.SetActiveView(vEmployeeList);
        }
    }

    protected void ibtnClose_Click(object sender, EventArgs e)
    {
        mvEmployees.SetActiveView(vEmployeeList);
        
    }

    protected void ibtnViewInfo_Command(object sender, CommandEventArgs e)
    {
        if (e.CommandName == "ViewEmployeeInfo")
        {
            hfEmployeeID.Value = e.CommandArgument.ToString();
            mvEmployees.SetActiveView(vEditEmployee);
            dvEmployeeInfo.ChangeMode(DetailsViewMode.ReadOnly);
        }
    }

    protected void dvEmployeeInfo_ItemDeleted(object sender, DetailsViewDeletedEventArgs e)
    {
        mvEmployees.SetActiveView(vEmployeeList);
        gvEmployees.DataBind();
    }
}
